import { Controller, UseGuards } from '@nestjs/common';
import { Crud } from 'nestjs-mongoose-crud'
import { Domains } from '@libs/db/models/domain.models';
import { InjectModel } from 'nestjs-typegoose';
import { ModelType } from '@typegoose/typegoose/lib/types';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { AuthGuard } from '@nestjs/passport';

@ApiTags('域名管理')
@Crud({
    model: Domains
})
@Controller('domain')
@ApiBearerAuth()
@UseGuards(AuthGuard("jwt"))
export class DomainController {
    constructor(@InjectModel(Domains) public model: ModelType<Domains>) { }
}
